<include file="Public/inc/header.html" />
<section class="content">
        <div class="row">
            <div class="col-md-12">
                <!-- Horizontal Form -->
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">添加仓库</h3>
                        <h3 class="box-title"><span><a href="/drm/index.php/Home/Respo/Index/">返回操作</a></span></h3>
                    </div><!-- /.box-header -->
                    <!-- form start -->
                    <form class="form-horizontal" method="POST" action="/drm/index.php/Home/Respo/Index/{$type}.html">
                        <input type='hidden' name='id' value="{$depot['id']}">
                        <!--<input>-->
                        <div class="box-body">
                            <div class="form-group">
                                <label for="name" class="col-sm-2 control-label">仓库名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name='name' id="name" placeholder="请输入仓库名称" value="{$depot['name']}" required >
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="use_rate" class="col-sm-2 control-label">仓库使用率：<span class='lead' id='show_rate'>50%</span></label>
                                <div class="col-sm-10">
                                    <input type="range" min='0.00' max='1.00' step='0.01' class="form-control" name='use_rate' id="use_rate" value="{$depot['use_rate']}" placeholder="仓库使用率默认为0" defaultValue='0'>
                                </div>
                                <!--<div class='col-sm-2'>0.01</div>-->
                            </div>
                            <div class="form-group">
                                <label for="address" class="col-sm-2 control-label">仓库地址</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name='address' id="address" placeholder="请输入仓库地址" value="{$depot['address']}" required>
                                </div>
                            </div>
                        </div><!-- /.box-body -->
                        <div class="box-footer">
                            <button type="submit" class="btn btn-info pull-right"><if condition="$type=='depotAdd'">添加<else />修改</if></button>
                        </div><!-- /.box-footer -->
                    </form>
                </div>
            </div>
        </div>
    </section>
<include file="Public/inc/footer.html" />
    <script>
        //时时获取存储率数据
        $('#use_rate').mousemove(function(){
            var rate = $(this).val();
            rate = rate*100;
            rate = Math.round(rate);
            $(this).parent().siblings().children().html(rate+'%');
        })
    </script>
